//
//  GQNavigationController.m
//  MyMusic
//
//  Created by sunny on 16/4/2.
//  Copyright © 2016年 sunny. All rights reserved.
//

#import "GQNavigationController.h"

@interface GQNavigationController ()

@end

@implementation GQNavigationController

+ (void)load
{
//    设置全局的导航条字体颜色
    UINavigationBar *navBar = [UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[self]];
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    dict[NSForegroundColorAttributeName] = [UIColor whiteColor];
    [navBar setTitleTextAttributes:dict];
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    设置导航条的背景图片
    [self.navigationBar setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:0 green:163 / 255.0 blue:231 / 255.0 alpha:0.8] size:CGSizeMake(GQUIScreenW, 64)] forBarMetrics:UIBarMetricsDefault];
    
}

//在pop之后，显示导航条
- (UIViewController *)popViewControllerAnimated:(BOOL)animated
{
    UIViewController *vc = [super popViewControllerAnimated:animated];
    vc.navigationController.navigationBarHidden = NO;
    return vc;
}
@end
